<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div v-if="number == 1">
            A
        </div>
        <div v-else-if="number == 2">
            B
        </div>
        <div v-else>
            C
        </div>
    </div>
    
</body>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    var vm =new Vue({
        el:'#app',
        data(){
            return{
                number:1
            }
        }
        
    })

    /*
    v-if 和 v-show 用于控制元素显示隐藏
    语法 v-if = "指定bool值" v-show 一样

    v-if 控制元素是否生成
    v-show 控制元素是否显示隐藏
    */
</script>
</html>